<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head>
<body>
<div id="app">
    <el-form ref="form" :model="form" label-width="80px">
        <el-upload
                action="/upload"
                :on-preview="handlePreview"
                accept=".pdf"
                :limit="10">
            <el-button size="small" type="primary">点击上传</el-button>
            <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div>
        </el-upload>
        <div>
            <el-button size="small" type="primary" @click="submitForm">确 定</el-button>
        </div>
    </el-form>
</div>

<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="https://unpkg.com/element-ui/lib/index.js"></script>

<script>
new Vue({
    el: '#app',
    methods:{
        handlePreview(file){
            window.open(file.response.url);
        }
    }
})
</script>
</body>
</html>